package org.luxor.cloud.gateway.component.security;

/**
 * @author XinmingYan @date 2019/9/16 23:34
 */
public interface SecurityConstants {

    /**
     * 内部
     */
    String FROM_IN = "Y";

    /**
     * 标志
     */
    String FROM = "X-Auth0-Token";

    /**
     * 默认白名单
     */
    String[] DEFAULT_ANON_URIS = new String[]{"/", "/error", "/favicon.ico", "/csrf"
            , "/actuator/**", "/webjars/**", "/swagger-**", "/swagger-resources/**", "/v2/api-docs"};

    /**
     * 匿名用户
     */
    String ANONYMOUS = "anonymousUser";

    /**
     * 角色前缀
     */
    String ROLE = "ROLE_";

    /**
     * 范围前缀
     */
    String SCOPE_PREFIX = "SCOPE_";

    /**
     * 租户ID字段
     */
    String TENANT_ID = "tenant_id";

    /**
     * 用户部门字段
     */
    String DEPT_ID = "dept_id";

    /**
     * 用户ID字段
     */
    String USER_ID = "user_id";

    /**
     * 登陆账号字段
     */
    String USERNAME = "user_name";

    /**
     * 真实姓名字段
     */
    String REALNAME = "real_name";

    /**
     * 账号生效状态字段
     */
    String ENABLED = "enabled";

    /**
     * 账号锁定状态字段
     */
    String ACCOUNT_NON_LOCKED = "account_non_locked";

    /**
     * 账号权限字段
     */
    String AUTHORITIES = "authorities";

}
